<div class="layui-side layui-bg-black layui-side-menu">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="layui-nav-tree">
            @foreach(Admin::menu() as $item)
                @if(Admin::user()->visible(\Illuminate\Support\Arr::get($item, 'roles', [])) && Admin::user()->can(\Illuminate\Support\Arr::get($item, 'permission')))
                    @if(!isset($item['children']))
                        <li class="layui-nav-item"><a href="javascript:;" data-href="{{ admin_url($item['uri']) }}" data-mpi="mpi-{{ $item['id'] }}"><i class="icon fa {{$item['icon']}}"></i>{{ admin_trans($item['title']) }}</a></li>
                    @else
                        <li class="layui-nav-item"><a href="javascript:;" data-mpi="mpi-{{ $item['id'] }}"><i class="icon fa {{$item['icon']}}"></i>{{ admin_trans($item['title']) }}</a>
                            <dl class="layui-nav-child">
                                @foreach($item['children'] as $childitem)
                                    <dd><a href="javascript:;" data-href="{{ admin_url($childitem['uri']) }}" data-mpi="mpi-{{ $item['id'] }}-{{ $childitem['id'] }}"><i class="icon fa {{$childitem['icon']}}"></i>{{ admin_trans($childitem['title']) }}</a></dd>
                                @endforeach
                            </dl>
                        </li>
                    @endif
                @endif
            @endforeach
        </ul>
    </div>
</div>
